package com.dubbo.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.dubbo.provider.service.ProviderService;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConsumerController {

    @Reference(version = "2.0.1")
    private ProviderService schoolService;

    @RequestMapping("/hello")
    public String sayHello(String word){
        return schoolService.sayHello(word);
    }
}
